<template>
    <a-dropdown-button-group :displayCount="2" popPlacement="bottom-end">
        <a-button
            :square="true"
            :color="'error'"
            :loading="loading"
            @click="loading = say('删除')"
        >
            <span class="fa fa-trash"></span>
        </a-button>
        <a-button
            :square="true"
            :color="'primary'"
            :loading="loading"
            @click="loading = say('编辑')"
        >
            <span class="fa fa-edit"></span>
        </a-button>
        <a-button
            :color="'secondary'"
            :loading="loading"
            @click="loading = say('查看SKU列表')"
        >
            查看SKU列表
        </a-button>
        <a-button
            :color="'success'"
            :loading="loading"
            @click="loading = say('新增SKU')"
        >
            新增SKU
        </a-button>

        <template v-slot:moreBtn>
            <a-button :square="true" :color="'error'">
                <span class="fa fa-ellipsis-h"></span>
            </a-button>
        </template>
    </a-dropdown-button-group>
</template>

<script>
import utils from '../../../common/utils'
export default {
    data() {
        return {
            loading: false
        }
    },
    methods: {
        async say(words) {
            await utils.sleep(1000)
            alert(words)
        }
    },
}
</script>